﻿<%@ Page Language="C#" Title="Wiki" AutoEventWireup="true" MasterPageFile="~/Shared/General.master"
    CodeBehind="ShowWiki.aspx.cs" Inherits="BugNET.WikiPages.ShowWiki" Async="true" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
    TagPrefix="HTMLEditor" %>
<%@ Import Namespace="BugNET.Entities" %>
<%@ Register Assembly="BugNET" Namespace="BugNET.UserInterfaceLayer.WebControls"
    TagPrefix="BNWC" %>
<asp:Content ID="Content2" ContentPlaceHolderID="Header" runat="Server">
    <asp:ValidationSummary ID="ValidationSummary1" DisplayMode="BulletList" HeaderText="<%$ Resources:SharedResources, ValidationSummaryHeaderText %>"
        CssClass="validationSummary" runat="server" />
    <bn:Message ID="Message1" runat="server" Width="100%" Visible="False" />
    <table style="width: 100%" cellspacing="0" cellpadding="0">
        <tr>
            <td align="right" style="width: 15%">
                <div class="float-left">
                    <h4>
                        <asp:Label ID="Label1" runat="server" Text="Page History:"></asp:Label></h4>
                </div>
            </td>
            <td align="left" style="width: 50%">
                <h4>
                    <div runat="server" id="divWikiPageName">
                        Page Name:
                    </div>
                </h4>
            </td>
            <td>
                <asp:Panel ID="pnlWikiActionButtons" Style="height: 25px;" runat="server">
                    <div class="float-right">
                        <ul id="horizontal-list">
                            <li id="WikiActionSave" runat="server"><span style="padding-right: 5px; border-right: 1px dotted #ccc">
                                <asp:ImageButton ID="imgSave" OnClick="LnkSaveClick" runat="server" CssClass="icon"
                                    ImageUrl="~\images\disk.gif" AlternateText="<%$ Resources:SharedResources, Save %>" />
                                <asp:LinkButton ID="lnkSave" OnClick="LnkSaveClick" runat="server" Text="Save" />
                            </span></li>
                            <li id="WikiActionSaveAndReturn" runat="server"><span style="padding-right: 5px;
                                padding-left: 10px; border-right: 1px dotted #ccc">
                                <asp:ImageButton ID="imgDone" OnClick="LnkDoneClick" runat="server" CssClass="icon"
                                    ImageUrl="~\images\disk.gif" AlternateText="<%$ Resources:SharedResources, SaveReturn %>" />
                                <asp:LinkButton ID="lnkDone" OnClick="LnkDoneClick" runat="server" meta:resourcekey="SaveReturn"
                                    Text="Save &amp; Return" />
                            </span></li>
                            <li id="WikiActionCancel" runat="server"><span style="padding-right: 5px; padding-left: 10px;">
                                <asp:ImageButton ID="imgCancel" OnClick="CancelButtonClick" CausesValidation="false"
                                    runat="server" CssClass="icon" ImageUrl="~\images\lt.gif" AlternateText="<%$ Resources:SharedResources, Cancel %>" />
                                <asp:LinkButton ID="lnkCancel" OnClick="CancelButtonClick" CausesValidation="false"
                                    runat="server" Text="<%$ Resources:SharedResources, Cancel %>" />
                            </span></li>
                        </ul>
                    </div>
                </asp:Panel>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="Fields" runat="server">
    <table style="width: 100%; border: 10">
        <tr>
            <td style="width: 15%" valign="top">
               
                <BNWC:GridView ID="grdVwWikiPagesHistory" runat="server" SkinID="GridView" AllowPaging="True"
                    PageSize="30" AllowSorting="False" BorderWidth="1px" BorderStyle="Solid" GridLines="None"
                    DataKeyNames="WikiPageId" UseAccessibleHeader="true" EnableMultiColumnSorting="False"
                    ShowSortSequence="False" PagerStyle-HorizontalAlign="right" OnRowDataBound="grdVwWikiPagesHistoryDetails_RowDataBound"
                    Width="100%" OnPageIndexChanging="grdVwWikiPagesHistoryDetails_PageIndexChanging"
                    AutoGenerateColumns="false" OnRowCommand="grdVwWikiPagesHistoryDetails_RowCommand">
                    <Columns>
                        <asp:TemplateField HeaderText="Version No">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:LinkButton ID="lnVersionNo" CommandName="Navigate" runat="Server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Created By">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label ID="lblCreatedby" runat="Server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </BNWC:GridView>
                <div class="pager" style="float: left">
                    <asp:DataPager ID="pager" runat="server" Visible="false" PageSize="10" PagedControlID="grdVwWikiPagesHistory">
                        <Fields>
                            <BNWC:BugNetPagerField NextPageImageUrl="~/App_Themes/Default/Images/resultset_next.gif"
                                PreviousPageImageUrl="~/App_Themes/Default/Images/resultset_previous.gif" LastPageImageUrl="~/App_Themes/Default/Images/resultset_last.gif"
                                FirstPageImageUrl="~/App_Themes/Default/Images/resultset_first.gif" />
                        </Fields>
                    </asp:DataPager>
                </div>
            </td>
            <td>
                <asp:Panel runat="server" ID="editorPanel">
                    <asp:TextBox ID="txtWikiContents" ViewStateMode="Enabled" TextMode="MultiLine" Columns="130"
                        Width="100%" Rows="200" runat="server" />
                    <ajaxToolkit:HtmlEditorExtender OnImageUploadComplete="HTMLEditorExtender_ImageUploadComplete"
                        ID="html_editor" EnableSanitization="true" TargetControlID="txtWikiContents" runat="server"
                        DisplaySourceTab="true">
                        <Toolbar>
                            <ajaxToolkit:Undo />
                            <ajaxToolkit:Redo />
                            <ajaxToolkit:Bold />
                            <ajaxToolkit:Italic />
                            <ajaxToolkit:Underline />
                            <ajaxToolkit:StrikeThrough />
                            <ajaxToolkit:Subscript />
                            <ajaxToolkit:Superscript />
                            <ajaxToolkit:JustifyLeft />
                            <ajaxToolkit:JustifyCenter />
                            <ajaxToolkit:JustifyRight />
                            <ajaxToolkit:JustifyFull />
                            <ajaxToolkit:InsertOrderedList />
                            <ajaxToolkit:InsertUnorderedList />
                            <ajaxToolkit:CreateLink />
                            <ajaxToolkit:UnLink />
                            <ajaxToolkit:RemoveFormat />
                            <ajaxToolkit:SelectAll />
                            <ajaxToolkit:UnSelect />
                            <ajaxToolkit:Delete />
                            <ajaxToolkit:Cut />
                            <ajaxToolkit:Copy />
                            <ajaxToolkit:Paste />
                            <ajaxToolkit:BackgroundColorSelector />
                            <ajaxToolkit:ForeColorSelector />
                            <ajaxToolkit:FontNameSelector />
                            <ajaxToolkit:FontSizeSelector />
                            <ajaxToolkit:Indent />
                            <ajaxToolkit:Outdent />
                            <ajaxToolkit:InsertHorizontalRule />
                            <ajaxToolkit:HorizontalSeparator />
                            <ajaxToolkit:InsertImage />
                        </Toolbar>
                    </ajaxToolkit:HtmlEditorExtender>
                </asp:Panel>
                <div id="divReadonlyContent" runat="server" visible="false" style="height: 500px;
                    border-width: 2px; border-style: Solid; border-color: gray; width: 100%; border-collapse: collapse;
                    border-collapse: separate; width: 100%; background-color: #fffff1">
                </div>
            </td>
        </tr>
    </table>
</asp:Content>
